# import random
# import string
# import datetime
# #
# # time_str = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
# # random_str = "".join(random.sample(string.digits, 4))
# #
# # print(time_str)
# # print(random_str)
#
# import requests
# import threading
#
#
# def buy(name):
#     print("{}在执行".format(name))
#     res = requests.post(
#         "http://127.0.0.1:8000/api/v1/buy/order?token=" + "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjUsImV4cCI6MTYwOTMwODY2OX0.HF78dwCrB2-sCyLXo6FcL0G04X_OyFbB13sli6IaJ9E",
#         json={"pay": 1, "address": 4})
#
#     print(res.json())
#     print("{}结束".format(name))
#
#
# if __name__ == '__main__':
#     for i in range(2):
#         th = threading.Thread(target=buy, args=("线程{}".format(i),))
#         th.start()
import redis

pool = redis.ConnectionPool(host='localhost', port=6379, decode_responses=True)
# 使用连接池，从连接池中 获取一个连接
r = redis.Redis(connection_pool=pool)

# gid_set = r.smembers("select_5")
gid_set = {'1', '2', '3'}
print(*gid_set)
# print(len("2020123122001496620501486380"))
